Repository navigation
Add medication adherence tracking - #230
Conversation
mudabs
left a comment
There was a problem hiding this comment.
Thank you, Olivia for adding the adherence model, API endpoints, UI controls, and localized feedback.
Please address these items before merge:
- Tie each adherence record to a scheduled dose or date. MedicationDose currently stores only the prescription, status, and recording time, so repeated clicks create duplicate records and doses on different days cannot be distinguished. Add scheduled-dose semantics or explicitly define manual event logging, then test duplicate submissions and date handling.
- Do not show adherence actions without schedule context, or provide a way to record the intended scheduled date.
- Give each medication's taken, skipped, and history controls medication-specific accessible names or a labelled group for screen readers.
- Format recorded_at using the selected application locale instead of the browser default.
- Add tests for empty history, history-load failure and retry, and rejected requests when health consent is missing.
mudabs
left a comment
There was a problem hiding this comment.
Thank you, Olivia, for adding scheduled-dose tracking, duplicate protection, accessible medication controls, localized timestamps, and the requested consent and error-state coverage.
Please address these remaining items before approval:
-
Resolve the SonarCloud quality gate failure. New-code duplication is 8.4%, above the required 3% limit. Refactor the duplicated adherence test setup or implementation and confirm SonarCloud passes.
-
Update the frontend test i18n resources with the new adherence strings. The current tests assert raw keys such as
recordTakenForMedication, so they do not verify the actual localized accessible names. Assert rendered medication-specific labels in at least English and one non-English locale.
All other CI checks pass. Please push the fixes and request another review.
|
mudabs
left a comment
There was a problem hiding this comment.
Thank you Olivia for addressing the scheduled-dose tracking, duplicate protection, accessibility, localization, consent, and test coverage feedback.
All CI checks pass and the requested fixes are complete. I am merging this PR using an admin bypass because the previous review status was not refreshed.



Summary:
Adds medication adherence tracking so users can record whether they took or skipped a scheduled medication dose and review their history.
Changes Made:
Closes #169